/**
 * 
 */
package com.acme.bankapp.domain.bank;

/**
 * @author Labun Konstantin
 * 
 */
public class Client {

	private Account account;

	private final Gender gender;

	private String name;

	/**
	 * @param account
	 * @param name
	 */
	public Client(String name, Gender gender, Account account) {
		super();
		this.account = account;
		this.name = name;
		this.gender = gender;
	}

	/**
	 * @return the account
	 */
	public Account getAccount() {
		return account;
	}

	public String getClientSalutation() {
		return gender + getName();
	}

	/**
	 * @return the gender
	 */
	public Gender getGender() {
		return gender;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		return getClientSalutation();
	}
}
